Associative Entities

An associative entity is an element of the Entity-relationship model. The database relational model does not offer direct support to many-to-many relationships, even though such relationships happen frequently in normal usage. The solution to this problem is the creation of another table to hold the necessary information for this relationship. This new table is called an associative entity.

To create a relationship, a "child" entity must inherit the primary key of a "parent" entity. However, in a many-to-many relationship, neither entity is the "parent" or the "child"; the relationship is "unresolved". In order to work, these databases require an additional construct to "resolve" the relationship (which is why associative entities are also referred to as "resolving entities").

An associative entity can be thought of as both an entity and a relationship since it encapsulates properties from both. It is a relationship since it is serving to join two or more entities together, but it is also an entity since it may have its own properties. The associative entity must have identifiers, Primary Keys, for both adjoining tables, but may also contain its own unique identifier and other information about the relationship.

The following guidelines may be used when considering the use of an associative entity:

See also

References